﻿using System;
namespace Producers.Rr.Xtee.Riik.Ee.Producer.Rr {
    
    
    [global::Xtee.Core.Attributes.XmlTypeAttribute(Name="RR96Response", Namespace="http://producers.rr.xtee.riik.ee/producer/rr", Target=typeof(RR96Response))]
    public class RR96ResponseSerializer : global::Xtee.Core.Types.AbstractXteeSerializable {
        
        protected IRR96Response clazz;
        
        public RR96ResponseSerializer(IRR96Response clazz) {
            this.clazz = clazz;
        }
        
        public override void WriteXml(global::Xtee.Core.IXteeXmlWriter Writer) {
            base.WriteXml(Writer);
            Writer.WriteStartElement("Veakood");
            Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "integer");
            Writer.WriteString(new global::Xtee.Core.Schema.XsdInteger(((decimal)(clazz.Veakood))).ToString());
            Writer.WriteEndElement();
            Writer.WriteStartElement("Veatekst");
            if (clazz.Veatekst!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Veatekst))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Veatekst");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("XTeeVeaTeade");
            if (clazz.XTeeVeaTeade!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.XTeeVeaTeade))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : XTeeVeaTeade");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("Isikuandmed");
            if (clazz.Isikuandmed!=null) {
                Writer.WriteTypeAttribute("http://schemas.xmlsoap.org/soap/encoding/", "Array");
                Writer.WriteArrayTypeAttribute(">>>RR96Response>Isikuandmed>item", "http://producers.rr.xtee.riik.ee/producer/rr", clazz.Isikuandmed.Count);
                for (int x = 0; ((clazz.Isikuandmed != null) 
                            && (x < clazz.Isikuandmed.Count)); x = (x + 1)) {
                    if (clazz.Isikuandmed[x]!=null) {
                        Writer.WriteStartElement("item");
                        global::Xtee.Core.SerializationMetadata metaIsikuandmed = this.GetMetaData(clazz.Isikuandmed[x]);
                        Writer.WriteTypeAttribute(metaIsikuandmed.TypeQualifiedName.Namespace, metaIsikuandmed.TypeQualifiedName.Name);
                        metaIsikuandmed.NewSerializer(clazz.Isikuandmed[x]).WriteXml(Writer);
                        Writer.WriteEndElement();
                    }
                }
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Isikuandmed");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("Dokumendiandmed");
            if (clazz.Dokumendiandmed!=null) {
                Writer.WriteTypeAttribute("http://schemas.xmlsoap.org/soap/encoding/", "Array");
                Writer.WriteArrayTypeAttribute(">>>RR96Response>Dokumendiandmed>item", "http://producers.rr.xtee.riik.ee/producer/rr", clazz.Dokumendiandmed.Count);
                for (int x = 0; ((clazz.Dokumendiandmed != null) 
                            && (x < clazz.Dokumendiandmed.Count)); x = (x + 1)) {
                    if (clazz.Dokumendiandmed[x]!=null) {
                        Writer.WriteStartElement("item");
                        global::Xtee.Core.SerializationMetadata metaDokumendiandmed = this.GetMetaData(clazz.Dokumendiandmed[x]);
                        Writer.WriteTypeAttribute(metaDokumendiandmed.TypeQualifiedName.Namespace, metaDokumendiandmed.TypeQualifiedName.Name);
                        metaDokumendiandmed.NewSerializer(clazz.Dokumendiandmed[x]).WriteXml(Writer);
                        Writer.WriteEndElement();
                    }
                }
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Dokumendiandmed");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("Suhe");
            if (clazz.Suhe!=null) {
                Writer.WriteTypeAttribute("http://schemas.xmlsoap.org/soap/encoding/", "Array");
                Writer.WriteArrayTypeAttribute(">>>RR96Response>Suhe>item", "http://producers.rr.xtee.riik.ee/producer/rr", clazz.Suhe.Count);
                for (int x = 0; ((clazz.Suhe != null) 
                            && (x < clazz.Suhe.Count)); x = (x + 1)) {
                    if (clazz.Suhe[x]!=null) {
                        Writer.WriteStartElement("item");
                        global::Xtee.Core.SerializationMetadata metaSuhe = this.GetMetaData(clazz.Suhe[x]);
                        Writer.WriteTypeAttribute(metaSuhe.TypeQualifiedName.Namespace, metaSuhe.TypeQualifiedName.Name);
                        metaSuhe.NewSerializer(clazz.Suhe[x]).WriteXml(Writer);
                        Writer.WriteEndElement();
                    }
                }
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Suhe");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("Elukohaandmed");
            if (clazz.Elukohaandmed!=null) {
                Writer.WriteTypeAttribute("http://schemas.xmlsoap.org/soap/encoding/", "Array");
                Writer.WriteArrayTypeAttribute(">>>RR96Response>Elukohaandmed>item", "http://producers.rr.xtee.riik.ee/producer/rr", clazz.Elukohaandmed.Count);
                for (int x = 0; ((clazz.Elukohaandmed != null) 
                            && (x < clazz.Elukohaandmed.Count)); x = (x + 1)) {
                    if (clazz.Elukohaandmed[x]!=null) {
                        Writer.WriteStartElement("item");
                        global::Xtee.Core.SerializationMetadata metaElukohaandmed = this.GetMetaData(clazz.Elukohaandmed[x]);
                        Writer.WriteTypeAttribute(metaElukohaandmed.TypeQualifiedName.Namespace, metaElukohaandmed.TypeQualifiedName.Name);
                        metaElukohaandmed.NewSerializer(clazz.Elukohaandmed[x]).WriteXml(Writer);
                        Writer.WriteEndElement();
                    }
                }
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Elukohaandmed");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("Kontaktandmed");
            if (clazz.Kontaktandmed!=null) {
                Writer.WriteTypeAttribute("http://schemas.xmlsoap.org/soap/encoding/", "Array");
                Writer.WriteArrayTypeAttribute(">>>RR96Response>Kontaktandmed>item", "http://producers.rr.xtee.riik.ee/producer/rr", clazz.Kontaktandmed.Count);
                for (int x = 0; ((clazz.Kontaktandmed != null) 
                            && (x < clazz.Kontaktandmed.Count)); x = (x + 1)) {
                    if (clazz.Kontaktandmed[x]!=null) {
                        Writer.WriteStartElement("item");
                        global::Xtee.Core.SerializationMetadata metaKontaktandmed = this.GetMetaData(clazz.Kontaktandmed[x]);
                        Writer.WriteTypeAttribute(metaKontaktandmed.TypeQualifiedName.Namespace, metaKontaktandmed.TypeQualifiedName.Name);
                        metaKontaktandmed.NewSerializer(clazz.Kontaktandmed[x]).WriteXml(Writer);
                        Writer.WriteEndElement();
                    }
                }
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Kontaktandmed");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("Hooldusoigused");
            if (clazz.Hooldusoigused!=null) {
                Writer.WriteTypeAttribute("http://schemas.xmlsoap.org/soap/encoding/", "Array");
                Writer.WriteArrayTypeAttribute(">>>RR96Response>Hooldusoigused>item", "http://producers.rr.xtee.riik.ee/producer/rr", clazz.Hooldusoigused.Count);
                for (int x = 0; ((clazz.Hooldusoigused != null) 
                            && (x < clazz.Hooldusoigused.Count)); x = (x + 1)) {
                    if (clazz.Hooldusoigused[x]!=null) {
                        Writer.WriteStartElement("item");
                        global::Xtee.Core.SerializationMetadata metaHooldusoigused = this.GetMetaData(clazz.Hooldusoigused[x]);
                        Writer.WriteTypeAttribute(metaHooldusoigused.TypeQualifiedName.Namespace, metaHooldusoigused.TypeQualifiedName.Name);
                        metaHooldusoigused.NewSerializer(clazz.Hooldusoigused[x]).WriteXml(Writer);
                        Writer.WriteEndElement();
                    }
                }
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Hooldusoigused");
            }
            Writer.WriteEndElement();
        }
        
        public override void ReadXml(global::Xtee.Core.IXteeXmlReader Reader) {
            base.ReadXml(Reader);
        START:
            if ((Reader.LocalName == "Veakood")) {
                goto Veakood;
            }
            else {
                if ((Reader.LocalName == "Veatekst")) {
                    goto Veatekst;
                }
                else {
                    if ((Reader.LocalName == "XTeeVeaTeade")) {
                        goto XTeeVeaTeade;
                    }
                    else {
                        if ((Reader.LocalName == "Isikuandmed")) {
                            goto Isikuandmed;
                        }
                        else {
                            if ((Reader.LocalName == "Dokumendiandmed")) {
                                goto Dokumendiandmed;
                            }
                            else {
                                if ((Reader.LocalName == "Suhe")) {
                                    goto Suhe;
                                }
                                else {
                                    if ((Reader.LocalName == "Elukohaandmed")) {
                                        goto Elukohaandmed;
                                    }
                                    else {
                                        if ((Reader.LocalName == "Kontaktandmed")) {
                                            goto Kontaktandmed;
                                        }
                                        else {
                                            if ((Reader.LocalName == "Hooldusoigused")) {
                                                goto Hooldusoigused;
                                            }
                                            else {
                                                return;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        Veakood:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>RR96Response>Veakood");
            }
            clazz.Veakood = new global::Xtee.Core.Schema.XsdInteger(Reader.ReadElementString("Veakood")).Value;
            goto START;
        Veatekst:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>RR96Response>Veatekst");
            }
            clazz.Veatekst = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Veatekst")).Value;
            goto START;
        XTeeVeaTeade:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>RR96Response>XTeeVeaTeade");
            }
            clazz.XTeeVeaTeade = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("XTeeVeaTeade")).Value;
            goto START;
        Isikuandmed:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>RR96Response>Isikuandmed");
            }
            clazz.Isikuandmed = new System.Collections.Generic.List<RR96Response.IIsikuandmedType>();
            if ((Reader.IsEmptyElement == false)) {
                Reader.ReadStartElement("Isikuandmed");
                for (; ((Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
                            && (Reader.LocalName == "item")); ) {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>RR96Response>Isikuandmed>item");
                    }
                    global::Xtee.Core.SerializationMetadata metaIsikuandmed = this.GetMetaData<RR96Response.IIsikuandmedType>(Reader, ">>>RR96Response>Isikuandmed>item", "http://producers.rr.xtee.riik.ee/producer/rr");
                    RR96Response.IIsikuandmedType item = metaIsikuandmed.NewEntity<RR96Response.IIsikuandmedType>();
                    clazz.Isikuandmed.Add(item);
                    if ((Reader.IsEmptyElement == false)) {
                        Reader.ReadStartElement("item");
                        metaIsikuandmed.NewSerializer(item).ReadXml(Reader);
                        Reader.ReadEndElement();
                    }
                    else {
                        Reader.Skip();
                    }
                }
                Reader.ReadEndElement();
            }
            else {
                Reader.Skip();
            }
            goto START;
        Dokumendiandmed:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>RR96Response>Dokumendiandmed");
            }
            clazz.Dokumendiandmed = new System.Collections.Generic.List<RR96Response.IDokumendiandmedType>();
            if ((Reader.IsEmptyElement == false)) {
                Reader.ReadStartElement("Dokumendiandmed");
                for (; ((Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
                            && (Reader.LocalName == "item")); ) {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>RR96Response>Dokumendiandmed>item");
                    }
                    global::Xtee.Core.SerializationMetadata metaDokumendiandmed = this.GetMetaData<RR96Response.IDokumendiandmedType>(Reader, ">>>RR96Response>Dokumendiandmed>item", "http://producers.rr.xtee.riik.ee/producer/rr");
                    RR96Response.IDokumendiandmedType item = metaDokumendiandmed.NewEntity<RR96Response.IDokumendiandmedType>();
                    clazz.Dokumendiandmed.Add(item);
                    if ((Reader.IsEmptyElement == false)) {
                        Reader.ReadStartElement("item");
                        metaDokumendiandmed.NewSerializer(item).ReadXml(Reader);
                        Reader.ReadEndElement();
                    }
                    else {
                        Reader.Skip();
                    }
                }
                Reader.ReadEndElement();
            }
            else {
                Reader.Skip();
            }
            goto START;
        Suhe:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>RR96Response>Suhe");
            }
            clazz.Suhe = new System.Collections.Generic.List<RR96Response.ISuheType>();
            if ((Reader.IsEmptyElement == false)) {
                Reader.ReadStartElement("Suhe");
                for (; ((Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
                            && (Reader.LocalName == "item")); ) {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>RR96Response>Suhe>item");
                    }
                    global::Xtee.Core.SerializationMetadata metaSuhe = this.GetMetaData<RR96Response.ISuheType>(Reader, ">>>RR96Response>Suhe>item", "http://producers.rr.xtee.riik.ee/producer/rr");
                    RR96Response.ISuheType item = metaSuhe.NewEntity<RR96Response.ISuheType>();
                    clazz.Suhe.Add(item);
                    if ((Reader.IsEmptyElement == false)) {
                        Reader.ReadStartElement("item");
                        metaSuhe.NewSerializer(item).ReadXml(Reader);
                        Reader.ReadEndElement();
                    }
                    else {
                        Reader.Skip();
                    }
                }
                Reader.ReadEndElement();
            }
            else {
                Reader.Skip();
            }
            goto START;
        Elukohaandmed:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>RR96Response>Elukohaandmed");
            }
            clazz.Elukohaandmed = new System.Collections.Generic.List<RR96Response.IElukohaandmedType>();
            if ((Reader.IsEmptyElement == false)) {
                Reader.ReadStartElement("Elukohaandmed");
                for (; ((Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
                            && (Reader.LocalName == "item")); ) {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>RR96Response>Elukohaandmed>item");
                    }
                    global::Xtee.Core.SerializationMetadata metaElukohaandmed = this.GetMetaData<RR96Response.IElukohaandmedType>(Reader, ">>>RR96Response>Elukohaandmed>item", "http://producers.rr.xtee.riik.ee/producer/rr");
                    RR96Response.IElukohaandmedType item = metaElukohaandmed.NewEntity<RR96Response.IElukohaandmedType>();
                    clazz.Elukohaandmed.Add(item);
                    if ((Reader.IsEmptyElement == false)) {
                        Reader.ReadStartElement("item");
                        metaElukohaandmed.NewSerializer(item).ReadXml(Reader);
                        Reader.ReadEndElement();
                    }
                    else {
                        Reader.Skip();
                    }
                }
                Reader.ReadEndElement();
            }
            else {
                Reader.Skip();
            }
            goto START;
        Kontaktandmed:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>RR96Response>Kontaktandmed");
            }
            clazz.Kontaktandmed = new System.Collections.Generic.List<RR96Response.IKontaktandmedType>();
            if ((Reader.IsEmptyElement == false)) {
                Reader.ReadStartElement("Kontaktandmed");
                for (; ((Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
                            && (Reader.LocalName == "item")); ) {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>RR96Response>Kontaktandmed>item");
                    }
                    global::Xtee.Core.SerializationMetadata metaKontaktandmed = this.GetMetaData<RR96Response.IKontaktandmedType>(Reader, ">>>RR96Response>Kontaktandmed>item", "http://producers.rr.xtee.riik.ee/producer/rr");
                    RR96Response.IKontaktandmedType item = metaKontaktandmed.NewEntity<RR96Response.IKontaktandmedType>();
                    clazz.Kontaktandmed.Add(item);
                    if ((Reader.IsEmptyElement == false)) {
                        Reader.ReadStartElement("item");
                        metaKontaktandmed.NewSerializer(item).ReadXml(Reader);
                        Reader.ReadEndElement();
                    }
                    else {
                        Reader.Skip();
                    }
                }
                Reader.ReadEndElement();
            }
            else {
                Reader.Skip();
            }
            goto START;
        Hooldusoigused:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>RR96Response>Hooldusoigused");
            }
            clazz.Hooldusoigused = new System.Collections.Generic.List<RR96Response.IHooldusoigusedType>();
            if ((Reader.IsEmptyElement == false)) {
                Reader.ReadStartElement("Hooldusoigused");
                for (; ((Reader.NodeType != System.Xml.XmlNodeType.EndElement) 
                            && (Reader.LocalName == "item")); ) {
                    if (Reader.IsElementNil()) {
                        throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>RR96Response>Hooldusoigused>item");
                    }
                    global::Xtee.Core.SerializationMetadata metaHooldusoigused = this.GetMetaData<RR96Response.IHooldusoigusedType>(Reader, ">>>RR96Response>Hooldusoigused>item", "http://producers.rr.xtee.riik.ee/producer/rr");
                    RR96Response.IHooldusoigusedType item = metaHooldusoigused.NewEntity<RR96Response.IHooldusoigusedType>();
                    clazz.Hooldusoigused.Add(item);
                    if ((Reader.IsEmptyElement == false)) {
                        Reader.ReadStartElement("item");
                        metaHooldusoigused.NewSerializer(item).ReadXml(Reader);
                        Reader.ReadEndElement();
                    }
                    else {
                        Reader.Skip();
                    }
                }
                Reader.ReadEndElement();
            }
            else {
                Reader.Skip();
            }
            goto START;
        }
        
        [global::Xtee.Core.Attributes.XmlTypeAttribute(Name=">>>RR96Response>Isikuandmed>item", Namespace="http://producers.rr.xtee.riik.ee/producer/rr", Target=typeof(RR96Response.IsikuandmedType))]
        public class IsikuandmedTypeSerializer : global::Xtee.Core.Types.AbstractXteeSerializable {
            
            protected RR96Response.IIsikuandmedType clazz;
            
            public IsikuandmedTypeSerializer(RR96Response.IIsikuandmedType clazz) {
                this.clazz = clazz;
            }
            
            public override void WriteXml(global::Xtee.Core.IXteeXmlWriter Writer) {
                base.WriteXml(Writer);
                Writer.WriteStartElement("Isikuandmed.Isikukood");
                if (clazz.IsikuandmedIsikukood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedIsikukood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedIsikukood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Eesnimi");
                if (clazz.IsikuandmedEesnimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedEesnimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedEesnimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Meesnm");
                if (clazz.IsikuandmedMeesnm!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedMeesnm))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedMeesnm");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Perenimi");
                if (clazz.IsikuandmedPerenimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedPerenimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedPerenimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Mperenm");
                if (clazz.IsikuandmedMperenm!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedMperenm))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedMperenm");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Synniperenimi");
                if (clazz.IsikuandmedSynniperenimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedSynniperenimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedSynniperenimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Sugu");
                if (clazz.IsikuandmedSugu!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedSugu))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedSugu");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.IsikuStaatus");
                if (clazz.IsikuandmedIsikuStaatus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedIsikuStaatus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedIsikuStaatus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Synniaeg");
                if (clazz.IsikuandmedSynniaeg!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedSynniaeg))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedSynniaeg");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Surmaaeg");
                if (clazz.IsikuandmedSurmaaeg!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedSurmaaeg))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedSurmaaeg");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Kodakondsuskood");
                if (clazz.IsikuandmedKodakondsuskood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedKodakondsuskood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedKodakondsuskood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Kodakondsustekstina");
                if (clazz.IsikuandmedKodakondsustekstina!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedKodakondsustekstina))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedKodakondsustekstina");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Synnikoht");
                if (clazz.IsikuandmedSynnikoht!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedSynnikoht))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedSynnikoht");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Perekonnaseis");
                if (clazz.IsikuandmedPerekonnaseis!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedPerekonnaseis))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedPerekonnaseis");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.ElukRegpe");
                if (clazz.IsikuandmedElukRegpe!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedElukRegpe))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedElukRegpe");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Teovoime");
                if (clazz.IsikuandmedTeovoime!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedTeovoime))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedTeovoime");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.KirjeStaatus");
                if (clazz.IsikuandmedKirjeStaatus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedKirjeStaatus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedKirjeStaatus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.SaabEestisse");
                if (clazz.IsikuandmedSaabEestisse!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedSaabEestisse))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedSaabEestisse");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.ViimatiPar");
                if (clazz.IsikuandmedViimatiPar!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedViimatiPar))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedViimatiPar");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.IsikuSeisund");
                if (clazz.IsikuandmedIsikuSeisund!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedIsikuSeisund))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedIsikuSeisund");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Andmed");
                if (clazz.IsikuandmedAndmed!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedAndmed))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedAndmed");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Emakeel");
                if (clazz.IsikuandmedEmakeel!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedEmakeel))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedEmakeel");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Rahvus");
                if (clazz.IsikuandmedRahvus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedRahvus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedRahvus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Haridus");
                if (clazz.IsikuandmedHaridus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedHaridus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedHaridus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.EKRIIK");
                if (clazz.IsikuandmedEKRIIK!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedEKRIIK))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedEKRIIK");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.EKmaakond");
                if (clazz.IsikuandmedEKmaakond!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedEKmaakond))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedEKmaakond");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.EKvald");
                if (clazz.IsikuandmedEKvald!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedEKvald))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedEKvald");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.EKasula");
                if (clazz.IsikuandmedEKasula!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedEKasula))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedEKasula");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Tegevusala");
                if (clazz.IsikuandmedTegevusala!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedTegevusala))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedTegevusala");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Amet");
                if (clazz.IsikuandmedAmet!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedAmet))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedAmet");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Eriala");
                if (clazz.IsikuandmedEriala!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedEriala))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedEriala");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Isanimi");
                if (clazz.IsikuandmedIsanimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedIsanimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedIsanimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.KoviSaabus");
                if (clazz.IsikuandmedKoviSaabus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedKoviSaabus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedKoviSaabus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Syriikkd");
                if (clazz.IsikuandmedSyriikkd!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedSyriikkd))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedSyriikkd");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.Syriiginimi");
                if (clazz.IsikuandmedSyriiginimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedSyriiginimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedSyriiginimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Isikuandmed.ElukAlates");
                if (clazz.IsikuandmedElukAlates!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IsikuandmedElukAlates))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IsikuandmedElukAlates");
                }
                Writer.WriteEndElement();
            }
            
            public override void ReadXml(global::Xtee.Core.IXteeXmlReader Reader) {
                base.ReadXml(Reader);
            START:
                if ((Reader.LocalName == "Isikuandmed.Isikukood")) {
                    goto IsikuandmedIsikukood;
                }
                else {
                    if ((Reader.LocalName == "Isikuandmed.Eesnimi")) {
                        goto IsikuandmedEesnimi;
                    }
                    else {
                        if ((Reader.LocalName == "Isikuandmed.Meesnm")) {
                            goto IsikuandmedMeesnm;
                        }
                        else {
                            if ((Reader.LocalName == "Isikuandmed.Perenimi")) {
                                goto IsikuandmedPerenimi;
                            }
                            else {
                                if ((Reader.LocalName == "Isikuandmed.Mperenm")) {
                                    goto IsikuandmedMperenm;
                                }
                                else {
                                    if ((Reader.LocalName == "Isikuandmed.Synniperenimi")) {
                                        goto IsikuandmedSynniperenimi;
                                    }
                                    else {
                                        if ((Reader.LocalName == "Isikuandmed.Sugu")) {
                                            goto IsikuandmedSugu;
                                        }
                                        else {
                                            if ((Reader.LocalName == "Isikuandmed.IsikuStaatus")) {
                                                goto IsikuandmedIsikuStaatus;
                                            }
                                            else {
                                                if ((Reader.LocalName == "Isikuandmed.Synniaeg")) {
                                                    goto IsikuandmedSynniaeg;
                                                }
                                                else {
                                                    if ((Reader.LocalName == "Isikuandmed.Surmaaeg")) {
                                                        goto IsikuandmedSurmaaeg;
                                                    }
                                                    else {
                                                        if ((Reader.LocalName == "Isikuandmed.Kodakondsuskood")) {
                                                            goto IsikuandmedKodakondsuskood;
                                                        }
                                                        else {
                                                            if ((Reader.LocalName == "Isikuandmed.Kodakondsustekstina")) {
                                                                goto IsikuandmedKodakondsustekstina;
                                                            }
                                                            else {
                                                                if ((Reader.LocalName == "Isikuandmed.Synnikoht")) {
                                                                    goto IsikuandmedSynnikoht;
                                                                }
                                                                else {
                                                                    if ((Reader.LocalName == "Isikuandmed.Perekonnaseis")) {
                                                                        goto IsikuandmedPerekonnaseis;
                                                                    }
                                                                    else {
                                                                        if ((Reader.LocalName == "Isikuandmed.ElukRegpe")) {
                                                                            goto IsikuandmedElukRegpe;
                                                                        }
                                                                        else {
                                                                            if ((Reader.LocalName == "Isikuandmed.Teovoime")) {
                                                                                goto IsikuandmedTeovoime;
                                                                            }
                                                                            else {
                                                                                if ((Reader.LocalName == "Isikuandmed.KirjeStaatus")) {
                                                                                    goto IsikuandmedKirjeStaatus;
                                                                                }
                                                                                else {
                                                                                    if ((Reader.LocalName == "Isikuandmed.SaabEestisse")) {
                                                                                        goto IsikuandmedSaabEestisse;
                                                                                    }
                                                                                    else {
                                                                                        if ((Reader.LocalName == "Isikuandmed.ViimatiPar")) {
                                                                                            goto IsikuandmedViimatiPar;
                                                                                        }
                                                                                        else {
                                                                                            if ((Reader.LocalName == "Isikuandmed.IsikuSeisund")) {
                                                                                                goto IsikuandmedIsikuSeisund;
                                                                                            }
                                                                                            else {
                                                                                                if ((Reader.LocalName == "Isikuandmed.Andmed")) {
                                                                                                    goto IsikuandmedAndmed;
                                                                                                }
                                                                                                else {
                                                                                                    if ((Reader.LocalName == "Isikuandmed.Emakeel")) {
                                                                                                        goto IsikuandmedEmakeel;
                                                                                                    }
                                                                                                    else {
                                                                                                        if ((Reader.LocalName == "Isikuandmed.Rahvus")) {
                                                                                                            goto IsikuandmedRahvus;
                                                                                                        }
                                                                                                        else {
                                                                                                            if ((Reader.LocalName == "Isikuandmed.Haridus")) {
                                                                                                                goto IsikuandmedHaridus;
                                                                                                            }
                                                                                                            else {
                                                                                                                if ((Reader.LocalName == "Isikuandmed.EKRIIK")) {
                                                                                                                    goto IsikuandmedEKRIIK;
                                                                                                                }
                                                                                                                else {
                                                                                                                    if ((Reader.LocalName == "Isikuandmed.EKmaakond")) {
                                                                                                                        goto IsikuandmedEKmaakond;
                                                                                                                    }
                                                                                                                    else {
                                                                                                                        if ((Reader.LocalName == "Isikuandmed.EKvald")) {
                                                                                                                            goto IsikuandmedEKvald;
                                                                                                                        }
                                                                                                                        else {
                                                                                                                            if ((Reader.LocalName == "Isikuandmed.EKasula")) {
                                                                                                                                goto IsikuandmedEKasula;
                                                                                                                            }
                                                                                                                            else {
                                                                                                                                if ((Reader.LocalName == "Isikuandmed.Tegevusala")) {
                                                                                                                                    goto IsikuandmedTegevusala;
                                                                                                                                }
                                                                                                                                else {
                                                                                                                                    if ((Reader.LocalName == "Isikuandmed.Amet")) {
                                                                                                                                        goto IsikuandmedAmet;
                                                                                                                                    }
                                                                                                                                    else {
                                                                                                                                        if ((Reader.LocalName == "Isikuandmed.Eriala")) {
                                                                                                                                            goto IsikuandmedEriala;
                                                                                                                                        }
                                                                                                                                        else {
                                                                                                                                            if ((Reader.LocalName == "Isikuandmed.Isanimi")) {
                                                                                                                                                goto IsikuandmedIsanimi;
                                                                                                                                            }
                                                                                                                                            else {
                                                                                                                                                if ((Reader.LocalName == "Isikuandmed.KoviSaabus")) {
                                                                                                                                                    goto IsikuandmedKoviSaabus;
                                                                                                                                                }
                                                                                                                                                else {
                                                                                                                                                    if ((Reader.LocalName == "Isikuandmed.Syriikkd")) {
                                                                                                                                                        goto IsikuandmedSyriikkd;
                                                                                                                                                    }
                                                                                                                                                    else {
                                                                                                                                                        if ((Reader.LocalName == "Isikuandmed.Syriiginimi")) {
                                                                                                                                                            goto IsikuandmedSyriiginimi;
                                                                                                                                                        }
                                                                                                                                                        else {
                                                                                                                                                            if ((Reader.LocalName == "Isikuandmed.ElukAlates")) {
                                                                                                                                                                goto IsikuandmedElukAlates;
                                                                                                                                                            }
                                                                                                                                                            else {
                                                                                                                                                                return;
                                                                                                                                                            }
                                                                                                                                                        }
                                                                                                                                                    }
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                    }
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            IsikuandmedIsikukood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Isikukood");
                }
                clazz.IsikuandmedIsikukood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Isikukood")).Value;
                goto START;
            IsikuandmedEesnimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Eesnimi");
                }
                clazz.IsikuandmedEesnimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Eesnimi")).Value;
                goto START;
            IsikuandmedMeesnm:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Meesnm");
                }
                clazz.IsikuandmedMeesnm = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Meesnm")).Value;
                goto START;
            IsikuandmedPerenimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Perenimi");
                }
                clazz.IsikuandmedPerenimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Perenimi")).Value;
                goto START;
            IsikuandmedMperenm:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Mperenm");
                }
                clazz.IsikuandmedMperenm = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Mperenm")).Value;
                goto START;
            IsikuandmedSynniperenimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Synniperenimi");
                }
                clazz.IsikuandmedSynniperenimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Synniperenimi")).Value;
                goto START;
            IsikuandmedSugu:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Sugu");
                }
                clazz.IsikuandmedSugu = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Sugu")).Value;
                goto START;
            IsikuandmedIsikuStaatus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.IsikuStaatus");
                }
                clazz.IsikuandmedIsikuStaatus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.IsikuStaatus")).Value;
                goto START;
            IsikuandmedSynniaeg:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Synniaeg");
                }
                clazz.IsikuandmedSynniaeg = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Synniaeg")).Value;
                goto START;
            IsikuandmedSurmaaeg:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Surmaaeg");
                }
                clazz.IsikuandmedSurmaaeg = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Surmaaeg")).Value;
                goto START;
            IsikuandmedKodakondsuskood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Kodakondsuskood");
                }
                clazz.IsikuandmedKodakondsuskood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Kodakondsuskood")).Value;
                goto START;
            IsikuandmedKodakondsustekstina:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Kodakondsustekstina");
                }
                clazz.IsikuandmedKodakondsustekstina = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Kodakondsustekstina")).Value;
                goto START;
            IsikuandmedSynnikoht:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Synnikoht");
                }
                clazz.IsikuandmedSynnikoht = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Synnikoht")).Value;
                goto START;
            IsikuandmedPerekonnaseis:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Perekonnaseis");
                }
                clazz.IsikuandmedPerekonnaseis = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Perekonnaseis")).Value;
                goto START;
            IsikuandmedElukRegpe:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.ElukRegpe");
                }
                clazz.IsikuandmedElukRegpe = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.ElukRegpe")).Value;
                goto START;
            IsikuandmedTeovoime:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Teovoime");
                }
                clazz.IsikuandmedTeovoime = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Teovoime")).Value;
                goto START;
            IsikuandmedKirjeStaatus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.KirjeStaatus");
                }
                clazz.IsikuandmedKirjeStaatus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.KirjeStaatus")).Value;
                goto START;
            IsikuandmedSaabEestisse:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.SaabEestisse");
                }
                clazz.IsikuandmedSaabEestisse = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.SaabEestisse")).Value;
                goto START;
            IsikuandmedViimatiPar:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.ViimatiPar");
                }
                clazz.IsikuandmedViimatiPar = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.ViimatiPar")).Value;
                goto START;
            IsikuandmedIsikuSeisund:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.IsikuSeisund");
                }
                clazz.IsikuandmedIsikuSeisund = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.IsikuSeisund")).Value;
                goto START;
            IsikuandmedAndmed:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Andmed");
                }
                clazz.IsikuandmedAndmed = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Andmed")).Value;
                goto START;
            IsikuandmedEmakeel:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Emakeel");
                }
                clazz.IsikuandmedEmakeel = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Emakeel")).Value;
                goto START;
            IsikuandmedRahvus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Rahvus");
                }
                clazz.IsikuandmedRahvus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Rahvus")).Value;
                goto START;
            IsikuandmedHaridus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Haridus");
                }
                clazz.IsikuandmedHaridus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Haridus")).Value;
                goto START;
            IsikuandmedEKRIIK:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.EKRIIK");
                }
                clazz.IsikuandmedEKRIIK = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.EKRIIK")).Value;
                goto START;
            IsikuandmedEKmaakond:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.EKmaakond");
                }
                clazz.IsikuandmedEKmaakond = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.EKmaakond")).Value;
                goto START;
            IsikuandmedEKvald:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.EKvald");
                }
                clazz.IsikuandmedEKvald = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.EKvald")).Value;
                goto START;
            IsikuandmedEKasula:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.EKasula");
                }
                clazz.IsikuandmedEKasula = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.EKasula")).Value;
                goto START;
            IsikuandmedTegevusala:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Tegevusala");
                }
                clazz.IsikuandmedTegevusala = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Tegevusala")).Value;
                goto START;
            IsikuandmedAmet:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Amet");
                }
                clazz.IsikuandmedAmet = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Amet")).Value;
                goto START;
            IsikuandmedEriala:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Eriala");
                }
                clazz.IsikuandmedEriala = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Eriala")).Value;
                goto START;
            IsikuandmedIsanimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Isanimi");
                }
                clazz.IsikuandmedIsanimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Isanimi")).Value;
                goto START;
            IsikuandmedKoviSaabus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.KoviSaabus");
                }
                clazz.IsikuandmedKoviSaabus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.KoviSaabus")).Value;
                goto START;
            IsikuandmedSyriikkd:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Syriikkd");
                }
                clazz.IsikuandmedSyriikkd = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Syriikkd")).Value;
                goto START;
            IsikuandmedSyriiginimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.Syriiginimi");
                }
                clazz.IsikuandmedSyriiginimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.Syriiginimi")).Value;
                goto START;
            IsikuandmedElukAlates:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Isikuandmed>item>Isikuandmed.ElukAlates");
                }
                clazz.IsikuandmedElukAlates = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Isikuandmed.ElukAlates")).Value;
                goto START;
            }
        }
        
        [global::Xtee.Core.Attributes.XmlTypeAttribute(Name=">>>RR96Response>Dokumendiandmed>item", Namespace="http://producers.rr.xtee.riik.ee/producer/rr", Target=typeof(RR96Response.DokumendiandmedType))]
        public class DokumendiandmedTypeSerializer : global::Xtee.Core.Types.AbstractXteeSerializable {
            
            protected RR96Response.IDokumendiandmedType clazz;
            
            public DokumendiandmedTypeSerializer(RR96Response.IDokumendiandmedType clazz) {
                this.clazz = clazz;
            }
            
            public override void WriteXml(global::Xtee.Core.IXteeXmlWriter Writer) {
                base.WriteXml(Writer);
                Writer.WriteStartElement("Dokumendiandmed.Kood");
                if (clazz.DokumendiandmedKood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedKood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedKood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Nimetus");
                if (clazz.DokumendiandmedNimetus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedNimetus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedNimetus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Seeria");
                if (clazz.DokumendiandmedSeeria!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedSeeria))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedSeeria");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Number");
                if (clazz.DokumendiandmedNumber!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedNumber))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedNumber");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.DokStaatus");
                if (clazz.DokumendiandmedDokStaatus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedDokStaatus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedDokStaatus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.DokKontr");
                if (clazz.DokumendiandmedDokKontr!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedDokKontr))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedDokKontr");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.AsutusRiik");
                if (clazz.DokumendiandmedAsutusRiik!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedAsutusRiik))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedAsutusRiik");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Asutus");
                if (clazz.DokumendiandmedAsutus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedAsutus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedAsutus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.DokValjastamisKuup");
                if (clazz.DokumendiandmedDokValjastamisKuup!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedDokValjastamisKuup))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedDokValjastamisKuup");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Sisestatud");
                if (clazz.DokumendiandmedSisestatud!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedSisestatud))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedSisestatud");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.DokSyndKuup");
                if (clazz.DokumendiandmedDokSyndKuup!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedDokSyndKuup))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedDokSyndKuup");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.KehtivAlates");
                if (clazz.DokumendiandmedKehtivAlates!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedKehtivAlates))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedKehtivAlates");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.KehtivKuni");
                if (clazz.DokumendiandmedKehtivKuni!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedKehtivKuni))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedKehtivKuni");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.IsikIsikukood");
                if (clazz.DokumendiandmedIsikIsikukood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedIsikIsikukood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedIsikIsikukood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.DokIsikukood");
                if (clazz.DokumendiandmedDokIsikukood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedDokIsikukood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedDokIsikukood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.DokPerekonnanimi");
                if (clazz.DokumendiandmedDokPerekonnanimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedDokPerekonnanimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedDokPerekonnanimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.DokEesnimi");
                if (clazz.DokumendiandmedDokEesnimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedDokEesnimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedDokEesnimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Dok_osalus");
                if (clazz.DokumendiandmedDokOsalus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedDokOsalus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedDokOsalus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Teised_IsikIskood");
                if (clazz.DokumendiandmedTeisedIsikIskood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedTeisedIsikIskood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedTeisedIsikIskood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Teised_DokIskood");
                if (clazz.DokumendiandmedTeisedDokIskood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedTeisedDokIskood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedTeisedDokIskood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Teised_DokPerenimi");
                if (clazz.DokumendiandmedTeisedDokPerenimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedTeisedDokPerenimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedTeisedDokPerenimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Teised_DokEesnimi");
                if (clazz.DokumendiandmedTeisedDokEesnimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedTeisedDokEesnimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedTeisedDokEesnimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.Teised_Dok_osalus");
                if (clazz.DokumendiandmedTeisedDokOsalus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedTeisedDokOsalus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedTeisedDokOsalus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.DokVanaEesnimi");
                if (clazz.DokumendiandmedDokVanaEesnimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedDokVanaEesnimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedDokVanaEesnimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Dokumendiandmed.DokVanaPerenimi");
                if (clazz.DokumendiandmedDokVanaPerenimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.DokumendiandmedDokVanaPerenimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : DokumendiandmedDokVanaPerenimi");
                }
                Writer.WriteEndElement();
            }
            
            public override void ReadXml(global::Xtee.Core.IXteeXmlReader Reader) {
                base.ReadXml(Reader);
            START:
                if ((Reader.LocalName == "Dokumendiandmed.Kood")) {
                    goto DokumendiandmedKood;
                }
                else {
                    if ((Reader.LocalName == "Dokumendiandmed.Nimetus")) {
                        goto DokumendiandmedNimetus;
                    }
                    else {
                        if ((Reader.LocalName == "Dokumendiandmed.Seeria")) {
                            goto DokumendiandmedSeeria;
                        }
                        else {
                            if ((Reader.LocalName == "Dokumendiandmed.Number")) {
                                goto DokumendiandmedNumber;
                            }
                            else {
                                if ((Reader.LocalName == "Dokumendiandmed.DokStaatus")) {
                                    goto DokumendiandmedDokStaatus;
                                }
                                else {
                                    if ((Reader.LocalName == "Dokumendiandmed.DokKontr")) {
                                        goto DokumendiandmedDokKontr;
                                    }
                                    else {
                                        if ((Reader.LocalName == "Dokumendiandmed.AsutusRiik")) {
                                            goto DokumendiandmedAsutusRiik;
                                        }
                                        else {
                                            if ((Reader.LocalName == "Dokumendiandmed.Asutus")) {
                                                goto DokumendiandmedAsutus;
                                            }
                                            else {
                                                if ((Reader.LocalName == "Dokumendiandmed.DokValjastamisKuup")) {
                                                    goto DokumendiandmedDokValjastamisKuup;
                                                }
                                                else {
                                                    if ((Reader.LocalName == "Dokumendiandmed.Sisestatud")) {
                                                        goto DokumendiandmedSisestatud;
                                                    }
                                                    else {
                                                        if ((Reader.LocalName == "Dokumendiandmed.DokSyndKuup")) {
                                                            goto DokumendiandmedDokSyndKuup;
                                                        }
                                                        else {
                                                            if ((Reader.LocalName == "Dokumendiandmed.KehtivAlates")) {
                                                                goto DokumendiandmedKehtivAlates;
                                                            }
                                                            else {
                                                                if ((Reader.LocalName == "Dokumendiandmed.KehtivKuni")) {
                                                                    goto DokumendiandmedKehtivKuni;
                                                                }
                                                                else {
                                                                    if ((Reader.LocalName == "Dokumendiandmed.IsikIsikukood")) {
                                                                        goto DokumendiandmedIsikIsikukood;
                                                                    }
                                                                    else {
                                                                        if ((Reader.LocalName == "Dokumendiandmed.DokIsikukood")) {
                                                                            goto DokumendiandmedDokIsikukood;
                                                                        }
                                                                        else {
                                                                            if ((Reader.LocalName == "Dokumendiandmed.DokPerekonnanimi")) {
                                                                                goto DokumendiandmedDokPerekonnanimi;
                                                                            }
                                                                            else {
                                                                                if ((Reader.LocalName == "Dokumendiandmed.DokEesnimi")) {
                                                                                    goto DokumendiandmedDokEesnimi;
                                                                                }
                                                                                else {
                                                                                    if ((Reader.LocalName == "Dokumendiandmed.Dok_osalus")) {
                                                                                        goto DokumendiandmedDok_osalus;
                                                                                    }
                                                                                    else {
                                                                                        if ((Reader.LocalName == "Dokumendiandmed.Teised_IsikIskood")) {
                                                                                            goto DokumendiandmedTeised_IsikIskood;
                                                                                        }
                                                                                        else {
                                                                                            if ((Reader.LocalName == "Dokumendiandmed.Teised_DokIskood")) {
                                                                                                goto DokumendiandmedTeised_DokIskood;
                                                                                            }
                                                                                            else {
                                                                                                if ((Reader.LocalName == "Dokumendiandmed.Teised_DokPerenimi")) {
                                                                                                    goto DokumendiandmedTeised_DokPerenimi;
                                                                                                }
                                                                                                else {
                                                                                                    if ((Reader.LocalName == "Dokumendiandmed.Teised_DokEesnimi")) {
                                                                                                        goto DokumendiandmedTeised_DokEesnimi;
                                                                                                    }
                                                                                                    else {
                                                                                                        if ((Reader.LocalName == "Dokumendiandmed.Teised_Dok_osalus")) {
                                                                                                            goto DokumendiandmedTeised_Dok_osalus;
                                                                                                        }
                                                                                                        else {
                                                                                                            if ((Reader.LocalName == "Dokumendiandmed.DokVanaEesnimi")) {
                                                                                                                goto DokumendiandmedDokVanaEesnimi;
                                                                                                            }
                                                                                                            else {
                                                                                                                if ((Reader.LocalName == "Dokumendiandmed.DokVanaPerenimi")) {
                                                                                                                    goto DokumendiandmedDokVanaPerenimi;
                                                                                                                }
                                                                                                                else {
                                                                                                                    return;
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            DokumendiandmedKood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Kood");
                }
                clazz.DokumendiandmedKood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Kood")).Value;
                goto START;
            DokumendiandmedNimetus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Nimetus");
                }
                clazz.DokumendiandmedNimetus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Nimetus")).Value;
                goto START;
            DokumendiandmedSeeria:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Seeria");
                }
                clazz.DokumendiandmedSeeria = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Seeria")).Value;
                goto START;
            DokumendiandmedNumber:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Number");
                }
                clazz.DokumendiandmedNumber = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Number")).Value;
                goto START;
            DokumendiandmedDokStaatus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.DokStaatus");
                }
                clazz.DokumendiandmedDokStaatus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.DokStaatus")).Value;
                goto START;
            DokumendiandmedDokKontr:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.DokKontr");
                }
                clazz.DokumendiandmedDokKontr = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.DokKontr")).Value;
                goto START;
            DokumendiandmedAsutusRiik:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.AsutusRiik");
                }
                clazz.DokumendiandmedAsutusRiik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.AsutusRiik")).Value;
                goto START;
            DokumendiandmedAsutus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Asutus");
                }
                clazz.DokumendiandmedAsutus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Asutus")).Value;
                goto START;
            DokumendiandmedDokValjastamisKuup:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.DokValjastamisKuup");
                }
                clazz.DokumendiandmedDokValjastamisKuup = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.DokValjastamisKuup")).Value;
                goto START;
            DokumendiandmedSisestatud:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Sisestatud");
                }
                clazz.DokumendiandmedSisestatud = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Sisestatud")).Value;
                goto START;
            DokumendiandmedDokSyndKuup:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.DokSyndKuup");
                }
                clazz.DokumendiandmedDokSyndKuup = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.DokSyndKuup")).Value;
                goto START;
            DokumendiandmedKehtivAlates:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.KehtivAlates");
                }
                clazz.DokumendiandmedKehtivAlates = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.KehtivAlates")).Value;
                goto START;
            DokumendiandmedKehtivKuni:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.KehtivKuni");
                }
                clazz.DokumendiandmedKehtivKuni = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.KehtivKuni")).Value;
                goto START;
            DokumendiandmedIsikIsikukood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.IsikIsikukood");
                }
                clazz.DokumendiandmedIsikIsikukood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.IsikIsikukood")).Value;
                goto START;
            DokumendiandmedDokIsikukood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.DokIsikukood");
                }
                clazz.DokumendiandmedDokIsikukood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.DokIsikukood")).Value;
                goto START;
            DokumendiandmedDokPerekonnanimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.DokPerekonnanimi");
                }
                clazz.DokumendiandmedDokPerekonnanimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.DokPerekonnanimi")).Value;
                goto START;
            DokumendiandmedDokEesnimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.DokEesnimi");
                }
                clazz.DokumendiandmedDokEesnimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.DokEesnimi")).Value;
                goto START;
            DokumendiandmedDok_osalus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Dok_osalus");
                }
                clazz.DokumendiandmedDokOsalus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Dok_osalus")).Value;
                goto START;
            DokumendiandmedTeised_IsikIskood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Teised_IsikIskood");
                }
                clazz.DokumendiandmedTeisedIsikIskood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Teised_IsikIskood")).Value;
                goto START;
            DokumendiandmedTeised_DokIskood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Teised_DokIskood");
                }
                clazz.DokumendiandmedTeisedDokIskood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Teised_DokIskood")).Value;
                goto START;
            DokumendiandmedTeised_DokPerenimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Teised_DokPerenimi");
                }
                clazz.DokumendiandmedTeisedDokPerenimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Teised_DokPerenimi")).Value;
                goto START;
            DokumendiandmedTeised_DokEesnimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Teised_DokEesnimi");
                }
                clazz.DokumendiandmedTeisedDokEesnimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Teised_DokEesnimi")).Value;
                goto START;
            DokumendiandmedTeised_Dok_osalus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.Teised_Dok_osalus");
                }
                clazz.DokumendiandmedTeisedDokOsalus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.Teised_Dok_osalus")).Value;
                goto START;
            DokumendiandmedDokVanaEesnimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.DokVanaEesnimi");
                }
                clazz.DokumendiandmedDokVanaEesnimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.DokVanaEesnimi")).Value;
                goto START;
            DokumendiandmedDokVanaPerenimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Dokumendiandmed>item>Dokumendiandmed.DokVanaPerenimi");
                }
                clazz.DokumendiandmedDokVanaPerenimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Dokumendiandmed.DokVanaPerenimi")).Value;
                goto START;
            }
        }
        
        [global::Xtee.Core.Attributes.XmlTypeAttribute(Name=">>>RR96Response>Suhe>item", Namespace="http://producers.rr.xtee.riik.ee/producer/rr", Target=typeof(RR96Response.SuheType))]
        public class SuheTypeSerializer : global::Xtee.Core.Types.AbstractXteeSerializable {
            
            protected RR96Response.ISuheType clazz;
            
            public SuheTypeSerializer(RR96Response.ISuheType clazz) {
                this.clazz = clazz;
            }
            
            public override void WriteXml(global::Xtee.Core.IXteeXmlWriter Writer) {
                base.WriteXml(Writer);
                Writer.WriteStartElement("Suhe.Suhtetyyp");
                if (clazz.SuheSuhtetyyp!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheSuhtetyyp))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheSuhtetyyp");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.Isikukood");
                if (clazz.SuheIsikukood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheIsikukood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheIsikukood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.Perenimi");
                if (clazz.SuhePerenimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuhePerenimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuhePerenimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.Eesnimi");
                if (clazz.SuheEesnimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheEesnimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheEesnimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.Isanimi");
                if (clazz.SuheIsanimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheIsanimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheIsanimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.Eesti_aadress");
                if (clazz.SuheEestiAadress!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheEestiAadress))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheEestiAadress");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.Synnikoht");
                if (clazz.SuheSynnikoht!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheSynnikoht))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheSynnikoht");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.IsikuStaatus");
                if (clazz.SuheIsikuStaatus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheIsikuStaatus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheIsikuStaatus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.Staatus");
                if (clazz.SuheStaatus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheStaatus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheStaatus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.Alguskp");
                if (clazz.SuheAlguskp!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheAlguskp))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheAlguskp");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.Lopukp");
                if (clazz.SuheLopukp!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheLopukp))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheLopukp");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Suhe.IsikuIsikukood");
                if (clazz.SuheIsikuIsikukood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.SuheIsikuIsikukood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : SuheIsikuIsikukood");
                }
                Writer.WriteEndElement();
            }
            
            public override void ReadXml(global::Xtee.Core.IXteeXmlReader Reader) {
                base.ReadXml(Reader);
            START:
                if ((Reader.LocalName == "Suhe.Suhtetyyp")) {
                    goto SuheSuhtetyyp;
                }
                else {
                    if ((Reader.LocalName == "Suhe.Isikukood")) {
                        goto SuheIsikukood;
                    }
                    else {
                        if ((Reader.LocalName == "Suhe.Perenimi")) {
                            goto SuhePerenimi;
                        }
                        else {
                            if ((Reader.LocalName == "Suhe.Eesnimi")) {
                                goto SuheEesnimi;
                            }
                            else {
                                if ((Reader.LocalName == "Suhe.Isanimi")) {
                                    goto SuheIsanimi;
                                }
                                else {
                                    if ((Reader.LocalName == "Suhe.Eesti_aadress")) {
                                        goto SuheEesti_aadress;
                                    }
                                    else {
                                        if ((Reader.LocalName == "Suhe.Synnikoht")) {
                                            goto SuheSynnikoht;
                                        }
                                        else {
                                            if ((Reader.LocalName == "Suhe.IsikuStaatus")) {
                                                goto SuheIsikuStaatus;
                                            }
                                            else {
                                                if ((Reader.LocalName == "Suhe.Staatus")) {
                                                    goto SuheStaatus;
                                                }
                                                else {
                                                    if ((Reader.LocalName == "Suhe.Alguskp")) {
                                                        goto SuheAlguskp;
                                                    }
                                                    else {
                                                        if ((Reader.LocalName == "Suhe.Lopukp")) {
                                                            goto SuheLopukp;
                                                        }
                                                        else {
                                                            if ((Reader.LocalName == "Suhe.IsikuIsikukood")) {
                                                                goto SuheIsikuIsikukood;
                                                            }
                                                            else {
                                                                return;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            SuheSuhtetyyp:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.Suhtetyyp");
                }
                clazz.SuheSuhtetyyp = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.Suhtetyyp")).Value;
                goto START;
            SuheIsikukood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.Isikukood");
                }
                clazz.SuheIsikukood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.Isikukood")).Value;
                goto START;
            SuhePerenimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.Perenimi");
                }
                clazz.SuhePerenimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.Perenimi")).Value;
                goto START;
            SuheEesnimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.Eesnimi");
                }
                clazz.SuheEesnimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.Eesnimi")).Value;
                goto START;
            SuheIsanimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.Isanimi");
                }
                clazz.SuheIsanimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.Isanimi")).Value;
                goto START;
            SuheEesti_aadress:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.Eesti_aadress");
                }
                clazz.SuheEestiAadress = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.Eesti_aadress")).Value;
                goto START;
            SuheSynnikoht:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.Synnikoht");
                }
                clazz.SuheSynnikoht = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.Synnikoht")).Value;
                goto START;
            SuheIsikuStaatus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.IsikuStaatus");
                }
                clazz.SuheIsikuStaatus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.IsikuStaatus")).Value;
                goto START;
            SuheStaatus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.Staatus");
                }
                clazz.SuheStaatus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.Staatus")).Value;
                goto START;
            SuheAlguskp:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.Alguskp");
                }
                clazz.SuheAlguskp = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.Alguskp")).Value;
                goto START;
            SuheLopukp:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.Lopukp");
                }
                clazz.SuheLopukp = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.Lopukp")).Value;
                goto START;
            SuheIsikuIsikukood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Suhe>item>Suhe.IsikuIsikukood");
                }
                clazz.SuheIsikuIsikukood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Suhe.IsikuIsikukood")).Value;
                goto START;
            }
        }
        
        [global::Xtee.Core.Attributes.XmlTypeAttribute(Name=">>>RR96Response>Elukohaandmed>item", Namespace="http://producers.rr.xtee.riik.ee/producer/rr", Target=typeof(RR96Response.ElukohaandmedType))]
        public class ElukohaandmedTypeSerializer : global::Xtee.Core.Types.AbstractXteeSerializable {
            
            protected RR96Response.IElukohaandmedType clazz;
            
            public ElukohaandmedTypeSerializer(RR96Response.IElukohaandmedType clazz) {
                this.clazz = clazz;
            }
            
            public override void WriteXml(global::Xtee.Core.IXteeXmlWriter Writer) {
                base.WriteXml(Writer);
                Writer.WriteStartElement("Elukohaandmed.Riigikood");
                if (clazz.ElukohaandmedRiigikood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedRiigikood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedRiigikood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.Riiginimetus");
                if (clazz.ElukohaandmedRiiginimetus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedRiiginimetus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedRiiginimetus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.MaakonnaKood");
                if (clazz.ElukohaandmedMaakonnaKood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedMaakonnaKood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedMaakonnaKood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.MaakonnaNimetus");
                if (clazz.ElukohaandmedMaakonnaNimetus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedMaakonnaNimetus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedMaakonnaNimetus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.VallaKood");
                if (clazz.ElukohaandmedVallaKood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedVallaKood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedVallaKood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.VallaNimetus");
                if (clazz.ElukohaandmedVallaNimetus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedVallaNimetus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedVallaNimetus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.KylaKood");
                if (clazz.ElukohaandmedKylaKood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedKylaKood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedKylaKood");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.KylaNimetus");
                if (clazz.ElukohaandmedKylaNimetus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedKylaNimetus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedKylaNimetus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.Tanav");
                if (clazz.ElukohaandmedTanav!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedTanav))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedTanav");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.Majanr");
                if (clazz.ElukohaandmedMajanr!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedMajanr))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedMajanr");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.Korterinr");
                if (clazz.ElukohaandmedKorterinr!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedKorterinr))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedKorterinr");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.AadressTekstina");
                if (clazz.ElukohaandmedAadressTekstina!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedAadressTekstina))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedAadressTekstina");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.Postiindeks");
                if (clazz.ElukohaandmedPostiindeks!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedPostiindeks))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedPostiindeks");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.Algusekuup");
                if (clazz.ElukohaandmedAlgusekuup!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedAlgusekuup))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedAlgusekuup");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.Lopukuup");
                if (clazz.ElukohaandmedLopukuup!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedLopukuup))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedLopukuup");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.AadressiLiik");
                if (clazz.ElukohaandmedAadressiLiik!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedAadressiLiik))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedAadressiLiik");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Elukohaandmed.IsikuIsikukood");
                if (clazz.ElukohaandmedIsikuIsikukood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.ElukohaandmedIsikuIsikukood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : ElukohaandmedIsikuIsikukood");
                }
                Writer.WriteEndElement();
            }
            
            public override void ReadXml(global::Xtee.Core.IXteeXmlReader Reader) {
                base.ReadXml(Reader);
            START:
                if ((Reader.LocalName == "Elukohaandmed.Riigikood")) {
                    goto ElukohaandmedRiigikood;
                }
                else {
                    if ((Reader.LocalName == "Elukohaandmed.Riiginimetus")) {
                        goto ElukohaandmedRiiginimetus;
                    }
                    else {
                        if ((Reader.LocalName == "Elukohaandmed.MaakonnaKood")) {
                            goto ElukohaandmedMaakonnaKood;
                        }
                        else {
                            if ((Reader.LocalName == "Elukohaandmed.MaakonnaNimetus")) {
                                goto ElukohaandmedMaakonnaNimetus;
                            }
                            else {
                                if ((Reader.LocalName == "Elukohaandmed.VallaKood")) {
                                    goto ElukohaandmedVallaKood;
                                }
                                else {
                                    if ((Reader.LocalName == "Elukohaandmed.VallaNimetus")) {
                                        goto ElukohaandmedVallaNimetus;
                                    }
                                    else {
                                        if ((Reader.LocalName == "Elukohaandmed.KylaKood")) {
                                            goto ElukohaandmedKylaKood;
                                        }
                                        else {
                                            if ((Reader.LocalName == "Elukohaandmed.KylaNimetus")) {
                                                goto ElukohaandmedKylaNimetus;
                                            }
                                            else {
                                                if ((Reader.LocalName == "Elukohaandmed.Tanav")) {
                                                    goto ElukohaandmedTanav;
                                                }
                                                else {
                                                    if ((Reader.LocalName == "Elukohaandmed.Majanr")) {
                                                        goto ElukohaandmedMajanr;
                                                    }
                                                    else {
                                                        if ((Reader.LocalName == "Elukohaandmed.Korterinr")) {
                                                            goto ElukohaandmedKorterinr;
                                                        }
                                                        else {
                                                            if ((Reader.LocalName == "Elukohaandmed.AadressTekstina")) {
                                                                goto ElukohaandmedAadressTekstina;
                                                            }
                                                            else {
                                                                if ((Reader.LocalName == "Elukohaandmed.Postiindeks")) {
                                                                    goto ElukohaandmedPostiindeks;
                                                                }
                                                                else {
                                                                    if ((Reader.LocalName == "Elukohaandmed.Algusekuup")) {
                                                                        goto ElukohaandmedAlgusekuup;
                                                                    }
                                                                    else {
                                                                        if ((Reader.LocalName == "Elukohaandmed.Lopukuup")) {
                                                                            goto ElukohaandmedLopukuup;
                                                                        }
                                                                        else {
                                                                            if ((Reader.LocalName == "Elukohaandmed.AadressiLiik")) {
                                                                                goto ElukohaandmedAadressiLiik;
                                                                            }
                                                                            else {
                                                                                if ((Reader.LocalName == "Elukohaandmed.IsikuIsikukood")) {
                                                                                    goto ElukohaandmedIsikuIsikukood;
                                                                                }
                                                                                else {
                                                                                    return;
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            ElukohaandmedRiigikood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.Riigikood");
                }
                clazz.ElukohaandmedRiigikood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.Riigikood")).Value;
                goto START;
            ElukohaandmedRiiginimetus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.Riiginimetus");
                }
                clazz.ElukohaandmedRiiginimetus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.Riiginimetus")).Value;
                goto START;
            ElukohaandmedMaakonnaKood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.MaakonnaKood");
                }
                clazz.ElukohaandmedMaakonnaKood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.MaakonnaKood")).Value;
                goto START;
            ElukohaandmedMaakonnaNimetus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.MaakonnaNimetus");
                }
                clazz.ElukohaandmedMaakonnaNimetus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.MaakonnaNimetus")).Value;
                goto START;
            ElukohaandmedVallaKood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.VallaKood");
                }
                clazz.ElukohaandmedVallaKood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.VallaKood")).Value;
                goto START;
            ElukohaandmedVallaNimetus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.VallaNimetus");
                }
                clazz.ElukohaandmedVallaNimetus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.VallaNimetus")).Value;
                goto START;
            ElukohaandmedKylaKood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.KylaKood");
                }
                clazz.ElukohaandmedKylaKood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.KylaKood")).Value;
                goto START;
            ElukohaandmedKylaNimetus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.KylaNimetus");
                }
                clazz.ElukohaandmedKylaNimetus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.KylaNimetus")).Value;
                goto START;
            ElukohaandmedTanav:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.Tanav");
                }
                clazz.ElukohaandmedTanav = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.Tanav")).Value;
                goto START;
            ElukohaandmedMajanr:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.Majanr");
                }
                clazz.ElukohaandmedMajanr = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.Majanr")).Value;
                goto START;
            ElukohaandmedKorterinr:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.Korterinr");
                }
                clazz.ElukohaandmedKorterinr = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.Korterinr")).Value;
                goto START;
            ElukohaandmedAadressTekstina:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.AadressTekstina");
                }
                clazz.ElukohaandmedAadressTekstina = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.AadressTekstina")).Value;
                goto START;
            ElukohaandmedPostiindeks:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.Postiindeks");
                }
                clazz.ElukohaandmedPostiindeks = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.Postiindeks")).Value;
                goto START;
            ElukohaandmedAlgusekuup:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.Algusekuup");
                }
                clazz.ElukohaandmedAlgusekuup = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.Algusekuup")).Value;
                goto START;
            ElukohaandmedLopukuup:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.Lopukuup");
                }
                clazz.ElukohaandmedLopukuup = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.Lopukuup")).Value;
                goto START;
            ElukohaandmedAadressiLiik:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.AadressiLiik");
                }
                clazz.ElukohaandmedAadressiLiik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.AadressiLiik")).Value;
                goto START;
            ElukohaandmedIsikuIsikukood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Elukohaandmed>item>Elukohaandmed.IsikuIsikukood");
                }
                clazz.ElukohaandmedIsikuIsikukood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Elukohaandmed.IsikuIsikukood")).Value;
                goto START;
            }
        }
        
        [global::Xtee.Core.Attributes.XmlTypeAttribute(Name=">>>RR96Response>Kontaktandmed>item", Namespace="http://producers.rr.xtee.riik.ee/producer/rr", Target=typeof(RR96Response.KontaktandmedType))]
        public class KontaktandmedTypeSerializer : global::Xtee.Core.Types.AbstractXteeSerializable {
            
            protected RR96Response.IKontaktandmedType clazz;
            
            public KontaktandmedTypeSerializer(RR96Response.IKontaktandmedType clazz) {
                this.clazz = clazz;
            }
            
            public override void WriteXml(global::Xtee.Core.IXteeXmlWriter Writer) {
                base.WriteXml(Writer);
                Writer.WriteStartElement("Kontaktandmed.Sideaadress");
                if (clazz.KontaktandmedSideaadress!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.KontaktandmedSideaadress))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : KontaktandmedSideaadress");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Kontaktandmed.Liik");
                if (clazz.KontaktandmedLiik!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.KontaktandmedLiik))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : KontaktandmedLiik");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Kontaktandmed.Staatus");
                if (clazz.KontaktandmedStaatus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.KontaktandmedStaatus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : KontaktandmedStaatus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Kontaktandmed.Alguskp");
                if (clazz.KontaktandmedAlguskp!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.KontaktandmedAlguskp))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : KontaktandmedAlguskp");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Kontaktandmed.Lopukp");
                if (clazz.KontaktandmedLopukp!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.KontaktandmedLopukp))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : KontaktandmedLopukp");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Kontaktandmed.IsikuIsikukood");
                if (clazz.KontaktandmedIsikuIsikukood!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.KontaktandmedIsikuIsikukood))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : KontaktandmedIsikuIsikukood");
                }
                Writer.WriteEndElement();
            }
            
            public override void ReadXml(global::Xtee.Core.IXteeXmlReader Reader) {
                base.ReadXml(Reader);
            START:
                if ((Reader.LocalName == "Kontaktandmed.Sideaadress")) {
                    goto KontaktandmedSideaadress;
                }
                else {
                    if ((Reader.LocalName == "Kontaktandmed.Liik")) {
                        goto KontaktandmedLiik;
                    }
                    else {
                        if ((Reader.LocalName == "Kontaktandmed.Staatus")) {
                            goto KontaktandmedStaatus;
                        }
                        else {
                            if ((Reader.LocalName == "Kontaktandmed.Alguskp")) {
                                goto KontaktandmedAlguskp;
                            }
                            else {
                                if ((Reader.LocalName == "Kontaktandmed.Lopukp")) {
                                    goto KontaktandmedLopukp;
                                }
                                else {
                                    if ((Reader.LocalName == "Kontaktandmed.IsikuIsikukood")) {
                                        goto KontaktandmedIsikuIsikukood;
                                    }
                                    else {
                                        return;
                                    }
                                }
                            }
                        }
                    }
                }
            KontaktandmedSideaadress:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Kontaktandmed>item>Kontaktandmed.Sideaadress");
                }
                clazz.KontaktandmedSideaadress = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Kontaktandmed.Sideaadress")).Value;
                goto START;
            KontaktandmedLiik:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Kontaktandmed>item>Kontaktandmed.Liik");
                }
                clazz.KontaktandmedLiik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Kontaktandmed.Liik")).Value;
                goto START;
            KontaktandmedStaatus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Kontaktandmed>item>Kontaktandmed.Staatus");
                }
                clazz.KontaktandmedStaatus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Kontaktandmed.Staatus")).Value;
                goto START;
            KontaktandmedAlguskp:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Kontaktandmed>item>Kontaktandmed.Alguskp");
                }
                clazz.KontaktandmedAlguskp = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Kontaktandmed.Alguskp")).Value;
                goto START;
            KontaktandmedLopukp:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Kontaktandmed>item>Kontaktandmed.Lopukp");
                }
                clazz.KontaktandmedLopukp = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Kontaktandmed.Lopukp")).Value;
                goto START;
            KontaktandmedIsikuIsikukood:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Kontaktandmed>item>Kontaktandmed.IsikuIsikukood");
                }
                clazz.KontaktandmedIsikuIsikukood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Kontaktandmed.IsikuIsikukood")).Value;
                goto START;
            }
        }
        
        [global::Xtee.Core.Attributes.XmlTypeAttribute(Name=">>>RR96Response>Hooldusoigused>item", Namespace="http://producers.rr.xtee.riik.ee/producer/rr", Target=typeof(RR96Response.HooldusoigusedType))]
        public class HooldusoigusedTypeSerializer : global::Xtee.Core.Types.AbstractXteeSerializable {
            
            protected RR96Response.IHooldusoigusedType clazz;
            
            public HooldusoigusedTypeSerializer(RR96Response.IHooldusoigusedType clazz) {
                this.clazz = clazz;
            }
            
            public override void WriteXml(global::Xtee.Core.IXteeXmlWriter Writer) {
                base.WriteXml(Writer);
                Writer.WriteStartElement("Hooldusoigused.hoRoll");
                if (clazz.HooldusoigusedhoRoll!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HooldusoigusedhoRoll))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HooldusoigusedhoRoll");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Hooldusoigused.hoLiik");
                if (clazz.HooldusoigusedhoLiik!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HooldusoigusedhoLiik))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HooldusoigusedhoLiik");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Hooldusoigused.hoSisu");
                if (clazz.HooldusoigusedhoSisu!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HooldusoigusedhoSisu))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HooldusoigusedhoSisu");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Hooldusoigused.hoTeineIK");
                if (clazz.HooldusoigusedhoTeineIK!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HooldusoigusedhoTeineIK))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HooldusoigusedhoTeineIK");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Hooldusoigused.hoTeineEesnimi");
                if (clazz.HooldusoigusedhoTeineEesnimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HooldusoigusedhoTeineEesnimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HooldusoigusedhoTeineEesnimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Hooldusoigused.hoTeinePerenimi");
                if (clazz.HooldusoigusedhoTeinePerenimi!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HooldusoigusedhoTeinePerenimi))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HooldusoigusedhoTeinePerenimi");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Hooldusoigused.hoOlekStat");
                if (clazz.HooldusoigusedhoOlekStat!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HooldusoigusedhoOlekStat))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HooldusoigusedhoOlekStat");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Hooldusoigused.hoAlgus");
                if (clazz.HooldusoigusedhoAlgus!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HooldusoigusedhoAlgus))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HooldusoigusedhoAlgus");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Hooldusoigused.hoLopp");
                if (clazz.HooldusoigusedhoLopp!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HooldusoigusedhoLopp))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HooldusoigusedhoLopp");
                }
                Writer.WriteEndElement();
                Writer.WriteStartElement("Hooldusoigused.hoPrimIsik");
                if (clazz.HooldusoigusedhoPrimIsik!=null) {
                    Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                    Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HooldusoigusedhoPrimIsik))).ToString());
                }
                else {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HooldusoigusedhoPrimIsik");
                }
                Writer.WriteEndElement();
            }
            
            public override void ReadXml(global::Xtee.Core.IXteeXmlReader Reader) {
                base.ReadXml(Reader);
            START:
                if ((Reader.LocalName == "Hooldusoigused.hoRoll")) {
                    goto HooldusoigusedhoRoll;
                }
                else {
                    if ((Reader.LocalName == "Hooldusoigused.hoLiik")) {
                        goto HooldusoigusedhoLiik;
                    }
                    else {
                        if ((Reader.LocalName == "Hooldusoigused.hoSisu")) {
                            goto HooldusoigusedhoSisu;
                        }
                        else {
                            if ((Reader.LocalName == "Hooldusoigused.hoTeineIK")) {
                                goto HooldusoigusedhoTeineIK;
                            }
                            else {
                                if ((Reader.LocalName == "Hooldusoigused.hoTeineEesnimi")) {
                                    goto HooldusoigusedhoTeineEesnimi;
                                }
                                else {
                                    if ((Reader.LocalName == "Hooldusoigused.hoTeinePerenimi")) {
                                        goto HooldusoigusedhoTeinePerenimi;
                                    }
                                    else {
                                        if ((Reader.LocalName == "Hooldusoigused.hoOlekStat")) {
                                            goto HooldusoigusedhoOlekStat;
                                        }
                                        else {
                                            if ((Reader.LocalName == "Hooldusoigused.hoAlgus")) {
                                                goto HooldusoigusedhoAlgus;
                                            }
                                            else {
                                                if ((Reader.LocalName == "Hooldusoigused.hoLopp")) {
                                                    goto HooldusoigusedhoLopp;
                                                }
                                                else {
                                                    if ((Reader.LocalName == "Hooldusoigused.hoPrimIsik")) {
                                                        goto HooldusoigusedhoPrimIsik;
                                                    }
                                                    else {
                                                        return;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            HooldusoigusedhoRoll:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Hooldusoigused>item>Hooldusoigused.hoRoll");
                }
                clazz.HooldusoigusedhoRoll = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Hooldusoigused.hoRoll")).Value;
                goto START;
            HooldusoigusedhoLiik:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Hooldusoigused>item>Hooldusoigused.hoLiik");
                }
                clazz.HooldusoigusedhoLiik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Hooldusoigused.hoLiik")).Value;
                goto START;
            HooldusoigusedhoSisu:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Hooldusoigused>item>Hooldusoigused.hoSisu");
                }
                clazz.HooldusoigusedhoSisu = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Hooldusoigused.hoSisu")).Value;
                goto START;
            HooldusoigusedhoTeineIK:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Hooldusoigused>item>Hooldusoigused.hoTeineIK");
                }
                clazz.HooldusoigusedhoTeineIK = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Hooldusoigused.hoTeineIK")).Value;
                goto START;
            HooldusoigusedhoTeineEesnimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Hooldusoigused>item>Hooldusoigused.hoTeineEesnimi");
                }
                clazz.HooldusoigusedhoTeineEesnimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Hooldusoigused.hoTeineEesnimi")).Value;
                goto START;
            HooldusoigusedhoTeinePerenimi:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Hooldusoigused>item>Hooldusoigused.hoTeinePerenimi");
                }
                clazz.HooldusoigusedhoTeinePerenimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Hooldusoigused.hoTeinePerenimi")).Value;
                goto START;
            HooldusoigusedhoOlekStat:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Hooldusoigused>item>Hooldusoigused.hoOlekStat");
                }
                clazz.HooldusoigusedhoOlekStat = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Hooldusoigused.hoOlekStat")).Value;
                goto START;
            HooldusoigusedhoAlgus:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Hooldusoigused>item>Hooldusoigused.hoAlgus");
                }
                clazz.HooldusoigusedhoAlgus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Hooldusoigused.hoAlgus")).Value;
                goto START;
            HooldusoigusedhoLopp:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Hooldusoigused>item>Hooldusoigused.hoLopp");
                }
                clazz.HooldusoigusedhoLopp = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Hooldusoigused.hoLopp")).Value;
                goto START;
            HooldusoigusedhoPrimIsik:
                if (Reader.IsElementNil()) {
                    throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>>>RR96Response>Hooldusoigused>item>Hooldusoigused.hoPrimIsik");
                }
                clazz.HooldusoigusedhoPrimIsik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("Hooldusoigused.hoPrimIsik")).Value;
                goto START;
            }
        }
    }
}
